/*
 * ConfigManager.java
 *
 * Copyright (c) 2006 LightPole, Inc.
 * All rights reserved.
 *
 * No part of this source code may be copied, userd, or modified
 * without the express written consent of LightPole, Inc.
 *
 * Created on August 18, 2006, 2:56 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.bankcomm.common;

import com.rytong.tools.utils.Utils;

import android.app.Activity;
import android.graphics.Color;

/**
 * To store all the configuration variables which control globally
 */
public final class ConfigManager {

	public final static int COLOR_DKGREEN = 0xFF02400F;
	public final static int COLOR_GREEN = Color.GREEN;
	public final static int COLOR_GRAY = Color.GRAY;
	// 东航项目下拉框控件弹出框背景色默认色值
	static final int COLOR_SELECT = 0xFF5A8AB5;
	// 单选按钮中圆阴影着色
	public final static int COLOR_DKGRAY = Color.DKGRAY;
	public final static int COLOR_WHITE = Color.WHITE;
	// 单选按钮最外层园填充色
	public final static int COLOR_OUTERMOST = Color.WHITE;
	// 单选按钮最小半径定为15像素
	public final static int minRadius_ = 15;
	// 当前界面引用对象
	public static Activity currentView_;
	// 读取进度提示字体大小
	public static int SIZE_IMGWAITLOAD = 15;
	// tabbar控件字体大小
	public static int SIZE_TABBAR = 16;
	// 默认小号字体大小
	public static int SIZE_SMALL = 20;
	// 默认中号字体大小
	public static int SIZE_MEDIUM = 24;
	// 默认大好字体大小
	public static int SIZE_LARGE = 30;
	// 手机型号，暂时为写死
	static String phoneModel_ = "Android1.5";
	// This is the development server.
	
	// 校徽地址
	public static String SCHOOL_BADGE = Utils.SCHOOL_BADGE;
    
	//服务器地址
	public static String SERVER_URI = Utils.SERVER_URI;
    public static String SERVER_URI_NO_PORT = Utils.SERVER_URI_NO_PORT;
 	
	public static String SERVER_URI_LOGIN = "phone/getui?";

	public static String CLIENT_HELLO = "/user/hello?";
	public static String CLIENT_KEY_EXCHANGE = "/user/exchange?";
	public static String CLIENT_FACILITY_HELLO = "/user/handshake?";

	public static String LOGIN_URI = "phone_s/login?";// _s means use des
	// encript.
	public static String SESSION_KEY = "phone/get_keys?";
	public static String ASK_PHONE_NUM = "phone_s/ask_phone?"; // ask phone
	// number
	public static String LOGOUT_URI = "phone_s/logout?";
	public static String ACCOUNT_DETAILS = "phone/set?";
	public static String COLLECTION_LIST_URI = "collection/list";
	public static String CHANNEL_URI = "channel/def?";
	public static String RUNAPP_URI = "/app_s/run?";
	public static String ADD_POI_URI = "location/add?";
	public static String DEL_POI_URI = "location/delete?";
	public static String SAVE_POI_URI = "app/save_poi?";
	public static String MAP_URI = "map/get?";
	public static String GET_PIC_URI = "map/get_pic?";
	public static String GEOCODE_URI = "geocode?";
	public static String REV_GEOCODE_URI = "geocode/revname?";
	public static String SENDLOG_URI = "elog?";
	public static String ATOMPUB_URI = "atompub/action?";
	
	// 默认经纬度
	public static double default_current_lon = 121.50104300D;
	public static double default_current_lat = 31.2386740D;

	// 位置服务
	public static String MAP_BAIDU_URL = "http://api.map.baidu.com/ag/coord/convert?";
	public static String MAP_SEARCH_AROUND = "/gis/search_around?";
	public static String MAP_GET_NODE_DETAIL = "/gis/getNodeDetail?";
	public static String MAP_GET_MERCHANT_DETAIL = "/gis/getShopDetail?";
	public static String MAP_GET_MERCHANT_LIST = "/gis/get_merlist?";
	public static String MAP_GET_NODE_SEARCH = "/gis/city_ntype";
	public static String MAP_GET_NODE = "/gis/get_node?";
	public static String MAP_DO_BOOKING = "/gis/do_booking?";
	public static String MAP_GET_CITY = "/gis/get_city?";
	public static String PAYMENT_INTER_URL="/ebank/enjoy_q";
	

	//音频卡需求查询接口
	public static String ICCARD_URL=ConfigManager.SERVER_URI + "/ebank/business";
	public static String ICCARD_URL_S=ConfigManager.SERVER_URI + "/ebank_s/business";
	
	public static String GET_ONESERCRET = "/user_s/dynamickey";
	public static final String CERTIFICATE_PATH = "rootCA";

	public static String DEFAULTTEXT = "点击这里输入……";
	public static String LIGHTPOLE_USERAGENT;
	//小I语音路径
	public final static String ROBOT_I_URL = ConfigManager.SERVER_URI+"/ebank/robot_i?";
	//消息盒子
	public final static String NEWS_BOX = ConfigManager.SERVER_URI + "/ebank_s/getNews" ;
	/**
	 * S60 2nd FP1 has problem with image transparency.
	 */
	// public static final boolean IMAGE_TRANSPARENCY = false;
	public static final boolean IMAGE_TRANSPARENCY = true;

	/** Default alpha value used to draw menu panels and status bars. */
	public final static int DEFAULT_TRANSPARENCY = 0xa0000000;

	public final static int POIS_PER_SCREEN = 9;

	/**
	 * This is Sunnyvale, CA. NOTE: This must be in the same format as LocationManager::curLocToString().
	 */
	public static String DEFAULT_LOCATION = "31.2380000,121.51670000";
	public static String DEFAULT_LOCATION_NAME = "陆家嘴，上海";

	/**
	 * Location method: presetLoc is for debugging so that we don't retrieve locations every time. Manual location uses zip code (more added
	 * later) and works when GPS is not available. These variables can be configured from the Configuration screen, hence they are not
	 * final.
	 * 
	 * NOTE: when LocationManager initializes, it'll set UseManualLocation according to availability of JSR 179.
	 */
	public static boolean USE_PRESET_LOCATION = false;
	public static boolean USE_MANUAL_LOCATION = false;

	// All the map related numbers are actual numbers * 1000000 so that we
	// will just use the integer for all the map related calculations
	public static int PRESET_LOCATION_LON = 116488680;// -122417500;
	public static int PRESET_LOCATION_LAT = 39952480;// 37779300;

	/**
	 * defaultZoomLevelPerTile is the default zoom level for maps, and when we display a single POI on a map.
	 */
	public static final int DEF_ZOOM_LEVEL_PER_TILE = 4;
	/**
	 * Since we are using lingtu map, its zoomlevel is from 1 to 20, we use 1 to 15.
	 */
	public static final int ZOOM_UNIT_PER_TILE[] = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384 };
	/**
	 * Eventually this should be 17, or whatever the maximum our map provider allows. This is set to 12 to match the requirement of Yahoo
	 * Map Image API.
	 */
	public static final int MAX_ZOOM_LEVEL = 15;
	public static final int PIXELS_PER_TILE = 128;

	/**
	 * The factor of longitude is a constant, i.e., 360/2**16. The latitude is different. Because Yahoo (most likely) uses Mercator
	 * projection, the lat/y ratio is different at different latitudes. We can calculate the latutide-equivalence of one tile's width by
	 * first converting current latitude to a Y coordinate, the calculate the latitude of Y+1, and use this increment to calculate our tile
	 * size in terms of latitude.
	 */
	// public static final double baseLonLength = 0.00549;
	// public static final double baseLatLength = 0.00435; // Work fine in sf,
	// chicago
	// Estimated latitude scale for NYC.
	// public static double baseLatLength = 0.00417;
	public static final int BASE_LON_LENGTH = 5493;
	// public static final int BASE_LAT_LENGTH = 4350;

	/**
	 * This is for BOC branches
	 */
	public static final int BASE_LON_LENGTH_BOC = 34332;
	public static final int BASE_LAT_LENGTH_BOC = 34332;
	public static final int BASE_LENGTH_EXTEND = 100;

	/**
	 * User-Agent string we use in all of our HTTP transactions. XXX DO NOTE CHANGE THIS!!
	 */
	static final String makeUserAgent(String phoneModel, String version) {
		StringBuffer buf = new StringBuffer("LightPoleClient/");
		buf.append(version);
		// buf.append(" (");
		buf.append("/");
		buf.append(phoneModel);
		// buf.append(")");
		ConfigManager.LIGHTPOLE_USERAGENT = buf.toString();
		return ConfigManager.LIGHTPOLE_USERAGENT;
	}
	

	//获取自定义键盘随机数接口
	public static String GET_RANDOM_KEY_BOARD_SERVERKEY="/ebank_s/get_key_pw";
	

}
